# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=waylandpp
pkgver=0.2.8
pkgrel=0
arch="all"
url="https://github.com/NilsBrause/waylandpp"
options="!check" # No tests are run
pkgdesc="Wayland C++ bindings"
license="MIT AND GPL-3.0-or-later"
depends_dev="pugixml-dev wayland-dev mesa-dev"
makedepends="$depends_dev cmake doxygen graphviz"
source="https://github.com/nilsbrause/waylandpp/archive/$pkgver/waylandpp-$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="bf1b8a9e69b87547fc65989b9eaff88a442d8b2f01f5446cef960000b093390b1e557536837fbf38bb6d9a4f93e3985ea34c3253f94925b0f571b4606c980832  waylandpp-0.2.8.tar.gz"
